package com.mywork.mvpkodeinxml.common

import org.simpleframework.xml.core.Persister


//Simple-xml库
fun <T> String.getXmlObj(clazz: Class<*>): T? {

    var out: T? = null

    try {
        out = Persister().read(clazz, this) as T
    } catch (e: Exception) {
        e.printStackTrace()
    }

    return out
}
